var express = require('express');
var router = new express.Router();

var stockDAO= require('../service/stock')

router.get('/list',function (req,res) {

    stockDAO.queryForBalance(function (rows) {
        res.json(rows)
    })

})

router.get('/in',function (req,res) {
    var stock_in = {
        user_id:req.juery.user_id,
        in_type:req.jquery.in_type,
        in_date:req.jquery.in_date,
        details:[]
    };

    stockDAO.stockIn(stock_in,function (result) {
        res.json(result);
    })

})


module.exports =router;